/*****************************************************
** Author:
** Date: 2019-10-19
*
*****************************************************/

#ifndef __METHOD_H_
#define __METHOD_H_

#ifdef __cplusplus
extern "C"{
#endif


#include "comm.h"

int lua_arch_io_method1(lua_State *L, const char *function, \
                        unsigned char *input, int inlen, int *val);
int lua_arch_io_method2(lua_State *L, const char *function, \
                        unsigned char *input, int inlen, \
                        unsigned char *output, int maxsize, int *outlen);
int lua_arch_io_method3(lua_State *L, const char *function, \
                        unsigned char *input, int inlen, \
                        unsigned char *outstr, int maxsize);
int lua_arch_io_method4(lua_State *L, const char *function, \
                        int val1, int val2);

void lua_arch_pushtable(lua_State *L, unsigned char *input, int inlen);
int lua_arch_method_data2kv(lua_State *L, const char *function, \
                            int cloudid, unsigned char *input, int inlen, \
                            unsigned char *snapshot, int snapsize, \
                            unsigned char *kv, int maxsize);
int lua_arch_method_kve2data(lua_State *L, const char *function, \
                            int cloudid, unsigned char *input, int inlen, \
                            unsigned char *snapshot, int snapsize, \
                            unsigned char *output, int maxsize, int *outlen);

extern luaL_Reg lua_arch_lib[];


#ifdef __cplusplus
}
#endif

#endif /* __METHOD_H_ */

